package com.clusterswisdom.horn.api.tmall.action.refund;

import com.alibaba.fastjson.JSONObject;
import com.clusterswisdom.horn.api.ioc.HornAction;
import com.clusterswisdom.horn.api.ioc.HornResponse;
import com.clusterswisdom.horn.api.ioc.api.ApiConfig;
import com.clusterswisdom.horn.api.tmall.TmallInstance;
import com.taobao.api.response.RefundGetResponse;

/**
 * 退款事件通知
 * @author Administrator
 *
 */
public class RefundCreatedAction implements HornAction{
	
	/**
	 * event data like: {}
	 */
	@Override
	public HornResponse execute(ApiConfig config, JSONObject param) throws Exception {
		RefundGetResponse resp = (RefundGetResponse)TmallInstance.getInstance().executeRequest(param, "refund", "refundGet");
		return new HornResponse(true, resp.getRefund());
	}
}